package com.xm.xmapp.resp;

import android.graphics.Bitmap;

import com.amap.api.maps.model.LatLng;
import com.xm.xmapp.map.ClusterItem;

import java.util.List;

/**
 * Created by LDW on 2017/7/17.
 */
public class RespAllNetWorkCoordsBean{

    /**
     * times : 18006
     * is_update : 1
     * points : [{"network_name":"创新产业园F5","longitude":"117.138213","latitude":"31.838463","networkId":34,"networkType":3,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":1,"has_imgs":0,"network_rent_type":2,"car_total":"2"},{"network_name":"测试测试（分时长租）","longitude":"117.157999","latitude":"31.664081","networkId":"21","networkType":2,"handle_long_rent":1,"longrent_car_number":0,"is_send_car_service":1,"cars":0,"has_imgs":0,"network_rent_type":2,"car_total":"0"},{"network_name":"测试（分时长租）","longitude":"113.948618","latitude":"22.529242","networkId":"18","networkType":2,"handle_long_rent":0,"longrent_car_number":"1","is_send_car_service":1,"cars":0,"has_imgs":0,"network_rent_type":2,"car_total":"2"},{"network_name":"郑州的测试1网点（分时长租）","longitude":"113.669635","latitude":"34.565131","networkId":30,"networkType":1,"handle_long_rent":1,"longrent_car_number":"1","is_send_car_service":0,"cars":1,"has_imgs":0,"network_rent_type":2,"car_total":"2"},{"network_name":"特梵蒂冈的法国队","longitude":"114.775405","latitude":"25.832223","networkId":"33","networkType":2,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":0,"has_imgs":0,"network_rent_type":2,"car_total":"0"},{"network_name":"安徽江淮汽车股份有限公司停车场内","longitude":"113.931685","latitude":"22.605223","networkId":"15","networkType":3,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":0,"has_imgs":1,"network_rent_type":2,"car_total":"0"},{"network_name":"得唔得无的无","longitude":"114.042688","latitude":"22.552707","networkId":"32","networkType":1,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":0,"has_imgs":0,"network_rent_type":2,"car_total":"0"},{"network_name":"深圳的测试网点（郑州长时）","longitude":"113.864761","latitude":"22.575772","networkId":"25","networkType":1,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":0,"has_imgs":0,"network_rent_type":2,"car_total":"0"},{"network_name":"龙华测试网点（郑州分时）","longitude":"114.000401","latitude":"22.659255","networkId":"17","networkType":2,"handle_long_rent":1,"longrent_car_number":"1","is_send_car_service":1,"cars":0,"has_imgs":0,"network_rent_type":3,"car_total":"1"},{"network_name":"合肥的测试2网点（分时长租）","longitude":"117.346384","latitude":"31.82914","networkId":"29","networkType":1,"handle_long_rent":0,"longrent_car_number":"1","is_send_car_service":0,"cars":1,"has_imgs":0,"network_rent_type":2,"car_total":"2"},{"network_name":"宝安智谷(郑州分时长时)","longitude":"113.858492","latitude":"22.583141","networkId":16,"networkType":2,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":1,"cars":1,"has_imgs":1,"network_rent_type":2,"car_total":"3"},{"network_name":"安徽合肥（分时长租）","longitude":"115.926311","latitude":"30.871317","networkId":"23","networkType":2,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":0,"has_imgs":0,"network_rent_type":3,"car_total":"0"},{"network_name":"宣城的测试1网点（分时）","longitude":"117.172319","latitude":"40.635015","networkId":"31","networkType":3,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":2,"has_imgs":0,"network_rent_type":1,"car_total":"2"},{"network_name":"海马测试点（郑州fen时）","longitude":"113.416053","latitude":"23.291816","networkId":"27","networkType":2,"handle_long_rent":0,"longrent_car_number":0,"is_send_car_service":0,"cars":0,"has_imgs":0,"network_rent_type":1,"car_total":"1"},{"network_name":"白石洲（分时）","longitude":"113.969734","latitude":"22.545493","networkId":14,"networkType":2,"handle_long_rent":0,"longrent_car_number":"2","is_send_car_service":1,"cars":1,"has_imgs":1,"network_rent_type":2,"car_total":"3"}]
     */

    private String times;
    private int is_update;
    private List<PointsBean> points;

    public String getTimes() {
        return times;
    }

    public void setTimes(String times) {
        this.times = times;
    }

    public int getIs_update() {
        return is_update;
    }

    public void setIs_update(int is_update) {
        this.is_update = is_update;
    }

    public List<PointsBean> getPoints() {
        return points;
    }

    public void setPoints(List<PointsBean> points) {
        this.points = points;
    }

    public static class PointsBean implements ClusterItem{
        /**
         * network_name : 创新产业园F5
         * longitude : 117.138213
         * latitude : 31.838463
         * networkId : 34
         * networkType : 3
         * handle_long_rent : 0
         * longrent_car_number : 0
         * is_send_car_service : 0
         * cars : 1
         * has_imgs : 0
         * network_rent_type : 2
         * car_total : 2
         */
        public static final int TYPE_OLD = 0;
        public static final int TYPE_SHORT = 1;
        public static final int TYPE_SHORT_LONG = 2;
        public static final int TYPE_LONG = 3;
        private String network_name;
        private String longitude;
        private String latitude;
        private int networkId;
        private int networkType;
        private int handle_long_rent;
        private int longrent_car_number;
        private int is_send_car_service;
        private int cars;
        private int has_imgs;
        private int network_rent_type;
        private String car_total;

        public String getNetwork_name() {
            return network_name;
        }

        public void setNetwork_name(String network_name) {
            this.network_name = network_name;
        }

        public String getLongitude() {
            return longitude;
        }

        public void setLongitude(String longitude) {
            this.longitude = longitude;
        }

        public String getLatitude() {
            return latitude;
        }

        public void setLatitude(String latitude) {
            this.latitude = latitude;
        }

        public int getNetworkId() {
            return networkId;
        }

        public void setNetworkId(int networkId) {
            this.networkId = networkId;
        }

        public int getNetworkType() {
            return networkType;
        }

        public void setNetworkType(int networkType) {
            this.networkType = networkType;
        }

        public int getHandle_long_rent() {
            return handle_long_rent;
        }

        public void setHandle_long_rent(int handle_long_rent) {
            this.handle_long_rent = handle_long_rent;
        }

        public int getLongrent_car_number() {
            return longrent_car_number;
        }

        public void setLongrent_car_number(int longrent_car_number) {
            this.longrent_car_number = longrent_car_number;
        }

        public int getIs_send_car_service() {
            return is_send_car_service;
        }

        public void setIs_send_car_service(int is_send_car_service) {
            this.is_send_car_service = is_send_car_service;
        }

        public int getCars() {
            return cars;
        }

        public void setCars(int cars) {
            this.cars = cars;
        }

        public int getHas_imgs() {
            return has_imgs;
        }

        public void setHas_imgs(int has_imgs) {
            this.has_imgs = has_imgs;
        }

        public int getNetwork_rent_type() {
            return network_rent_type;
        }

        public void setNetwork_rent_type(int network_rent_type) {
            this.network_rent_type = network_rent_type;
        }

        public String getCar_total() {
            return car_total;
        }

        public void setCar_total(String car_total) {
            this.car_total = car_total;
        }

        @Override
        public LatLng getLatLng() {
            try {
                double latLng = Double.parseDouble(getLatitude());
                double logLng = Double.parseDouble(getLongitude());
                return new LatLng(latLng,logLng);
            } catch (Exception e) {

            }
            return new LatLng(0,0);
        }

        @Override
        public Bitmap getImageBitmap(int flag) {
            return null;
        }

        @Override
        public String getNetWorkName() {
            return getNetwork_name();
        }

        @Override
        public String getNetWorkId() {
            return networkId+"";
        }
    }
}
